From: Cosimo Cecchi Date: Mon, 4 Mar 2013 21:23:45 +0000 (-0500) Subject: overviewControls: only show chat icon in messages indicator for chats X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4549 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aac312ca34ff0e2816ee45ee315d0d12f9834e7f;p=gnome-shell.git overviewControls: only show chat icon in messages indicator for chats Only show the chat icon in the new messages indicator when at least one among the outstanding notifications is a chat. --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 0906885ac..ba5c7a8f5 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -452,9 +452,11 @@ const MessagesIndicator = new Lang.Class({ _updateCount: function() { let count = 0; + let hasChats = false; this._sources.forEach(Lang.bind(this, function(source) { count += source.indicatorCount; + hasChats |= source.isChat; })); this._count = count; @@ -462,6 +464,7 @@ const MessagesIndicator = new Lang.Class({ "%d new messages", count).format(count); + this._icon.visible = hasChats; this._updateVisibility(); },